home *** CD-ROM | disk | FTP | other *** search
/ Info-Mac 3 / Info_Mac_1994-01.iso / Development / General / Jon's Commands 1.0b1 / Jon’s Commands Read Me < prev   
Text File  |  1993-09-12  |  4KB  |  63 lines

  1. Jon’s Commands 1.0b1
  2. Copyright 1993 by Jon Pugh
  3. (408) 428-9767
  4. jonpugh@netcom.com
  5.  
  6. Free for noncommercial use.  Contact me for a simple cheap license if you wish to include this as part of a software solution that you sell.
  7.  
  8. This AppleScript Scripting Addition provides AppleScript and all scriptable and Apple Event aware applications with added functionality.  To examine the AppleScript syntax of each of these commands, simply drag Jon’s Commands onto the Script Editor or use the Open Dictionary command to open it.  To install it, simply drop it into the Scripting Additions folder which is inside your Extensions folder.
  9.  
  10. Jon’s Commands includes these commands:
  11.    deleteFile - delete a single file
  12.    renameFile - rename a file
  13.    moveFile - move a file to a different folder
  14.    sound volume - get the volume setting
  15.    set sound volume to - set the volume setting
  16.    clipboard info - get a list of data on the clipboard
  17.    set the clipboard to - put data on the clipboard
  18.    the clipboard - get data from the clipboard
  19.    execute FKEY - run an FKEY resource
  20.    screen list - describe the monitor configuration
  21.    finder selection - return the Finder’s selection
  22.    keys pressed - get a list of pressed keys
  23.    machine environment - get info about the machine
  24.    play sound - play sound resources, files and descriptors
  25.  
  26. Jon’s Commands includes these objects:
  27.    picture - for getting them off the clipboard
  28.    sound - for getting them off the clipboard & playing them
  29.    screen info - for describing the monitors
  30.    environment info - for describing the machine
  31.  
  32. Notes for specific commands:
  33.  
  34. Finder Selection:
  35.  
  36. This Addition gets the Finder’s selected files and folders. This only works with Finder 7.0, 7.0.1 and 7.1. Using it with any other Finder will cause it to fail.  Hopefully it won’t crash, but it probably won’t work.  I only check for the system version (Gestalt doesn’t tell the Finder version, only the System version) so using a different Finder will definately cause problems.
  37.  
  38. You can place script applications in the Apple Menu Items folder and use the finder selection to have your script operate on the selected files.  Way cool.
  39.  
  40. DeleteFile, MoveFile & RenameFile:
  41.  
  42. These commands only work on single files.  DeleteFile is permanent and immediate.  Be very careful with it.  I recommend using “moveFile foo to (path to trash)” or the FinderLib if you are at all worried or inclined toward cautiousness.
  43.  
  44. execute FKEY:
  45.  
  46. This loads the FKEY resource and jumps to it. It does not press command-shift-N, so it will not trigger QuicKeys macros or any function which patches things to run at FKEY-like key combinations.
  47.  
  48. keys pressed & machine information:
  49.  
  50. Both of these use STR# resources if you are inclined to localize them.  The machine info is a subset of the available Gestalt selectors.  If you have need of others, let me know and we might be able to include them in a future version.
  51.  
  52. clipboard info, the clipboard & set the clipboard to:
  53.  
  54. All of these can manage multiple data types.  Styled text is the default data type, with plain text (known as string) as the backup.  International text is also supported, as are a lot of other data formats.  Almost any resource type can be manipulated in AppleScript as an AEDesc in applications. Pictures and sounds are also popular to move around.
  55.  
  56. sound volume & set sound volume to:
  57.  
  58. Both of these use a number between 0 and 7 for the volume, just like everyone else.
  59.  
  60. play sound:
  61.  
  62. This can play sound (‘snd ’) resources installed in the system or the current open files by either name or id number. It can also play sound resources out of files and out of AppleScript variables (typically accessed via the clipboard). You cannot interrupt a sound in progress in this version and the sounds are play synchronously.  This command is a small improvement on the sample code from the Language Reference Manual.
  63.